Skip to content

feat(browser): Read the release from the sentry-release meta tag - #26514

Open
sentry-junior[bot] wants to merge 3 commits into
fix/solidstart-release-runtimefrom
feat/browser-release-meta-tag
Open

sentry-junior[bot] wants to merge 3 commits into
fix/solidstart-release-runtimefrom
feat/browser-release-meta-tag

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

@sentry/browser now reads the release from <meta name="sentry-release"> when Sentry.init() gets no release. SvelteKit, SolidStart, React Router and TanStack Start drop their own client readers. Their servers now render the tag with one shared helper, _INTERNAL_getReleaseMetaTag from @sentry/core/server, which replaces four copies of escapeAttribute. The order is: an explicit release, then a __SENTRY_RELEASE__ define, then the meta tag, then window.SENTRY_RELEASE. An empty tag is ignored.

Why

Each SDK in this stack had its own copy of the meta tag reader, the tag name, and the attribute escaping. With one reader in the browser SDK, every framework that renders the tag gets the same behavior.

Decided in review:

  • Meta tag before window.SENTRY_RELEASE, after __SENTRY_RELEASE__: any bundle on the page can set window.SENTRY_RELEASE, and the page is more current than a cached chunk. A __SENTRY_RELEASE__ define belongs to the one bundle that set it, so an embedded script on another app's page keeps its own release.
  • Bundle size: @sentry/browser gets a few bytes bigger for every user. This is acceptable.
  • SolidStart now renders a self-closing <meta .../>, the same as the other SDKs.

Stacked on #26513.

Ref: #26485

via Isaac Schlueter.

--

View Session [Sentry]

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 2b2ba0e (PR test merge using develop at 05f7607)

Against: eb8ab33 (develop) · base run #66626

⚠️ Baseline mismatch: 25 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for 05f7607 finishes.

Path Size % Change Change
@sentry/browser 30.22 kB +0.15% +45 B 🔺
@sentry/browser - with treeshaking flags 28.42 kB +0.18% +49 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.32 kB +0.17% +46 B 🔺
@sentry/browser (incl. Tracing) 52.78 kB +0.09% +45 B 🔺
@sentry/browser (incl. Tracing Core) 40.31 kB +0.11% +42 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.79 kB +0.09% +43 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.67 kB +0.09% +46 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.83 kB +0.05% +44 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.65 kB +0.06% +45 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB +0.05% +48 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.75 kB +0.05% +47 B 🔺
@sentry/browser (incl. Feedback) 48.17 kB +0.1% +48 B 🔺
@sentry/browser (incl. sendFeedback) 30.8 kB +0.15% +45 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.83 kB +0.13% +45 B 🔺
@sentry/browser (incl. Metrics) 31.54 kB +0.15% +45 B 🔺
@sentry/browser (incl. Logs) 31.82 kB +0.15% +45 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.48 kB +0.14% +44 B 🔺
@sentry/react 32.24 kB +0.14% +44 B 🔺
@sentry/react (incl. Tracing) 55.43 kB +0.08% +41 B 🔺
@sentry/vue 38.43 kB +0.13% +48 B 🔺
@sentry/vue (incl. Tracing) 55.74 kB +0.09% +49 B 🔺
@sentry/svelte 30.24 kB +0.15% +44 B 🔺
@sentry/remix (Remix 3 client bundle) 58.44 kB +0.09% +48 B 🔺
CDN Bundle 32.16 kB +0.16% +49 B 🔺
CDN Bundle (incl. Tracing) 53.17 kB +0.06% +27 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.94 kB +0.15% +52 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.74 kB +0.05% +26 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.98 kB +0.08% +57 B 🔺
CDN Bundle (incl. Tracing, Replay) 91.06 kB +0.03% +25 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.67 kB +0.03% +23 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.46 kB +0.02% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.02 kB +0.02% +18 B 🔺
CDN Bundle - uncompressed 93.89 kB +0.11% +96 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.22 kB +0.07% +96 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.23 kB +0.1% +96 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 164.85 kB +0.06% +96 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.35 kB +0.05% +96 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.38 kB +0.04% +96 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285 kB +0.04% +96 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.31 kB +0.04% +96 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 296.92 kB +0.04% +96 B 🔺
@sentry/nextjs (client) 59.1 kB +0.15% +87 B 🔺
@sentry/sveltekit (client) 54.05 kB +0.05% +22 B 🔺
@sentry/core/server 45.11 kB +0.15% +67 B 🔺
@sentry/core/browser 14.4 kB - -
@sentry/node 152.01 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.34 kB - -
@sentry/node - without tracing 88.67 kB -0.01% -3 B 🔽
@sentry/node - without channel injection 140.93 kB -0.01% -10 B 🔽
@sentry/aws-serverless 99.03 kB -0.01% -3 B 🔽
@sentry/cloudflare (withSentry) - minified 206.95 kB - -
@sentry/cloudflare (withSentry) 480.37 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 232.31 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 62 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 11m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 46s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (bun) Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (deno) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 48s Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (cloudflare) Test (optional) Successful in 27s Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (latest) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 30s Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E node-eve (content off, latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 50s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 42s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 29s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E node-eve (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 26s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 1m Details

@isaacs isaacs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design is right. One reader in the browser SDK, one renderer in @sentry/core/server, and the tag name in one place is the simplification this stack needed. It also gives the release to apps that call Sentry.init from @sentry/browser or @sentry/react directly. The cost of a few bytes in every browser bundle is acceptable, and Size Check passes.

The crash when creating a client blocks this PR: it fails CI now and could break Sentry.init in real environments with a partial document. The __SENTRY_RELEASE__ order should be fixed at the same time, and the SvelteKit Cloudflare failures need a re-run or an explanation. Once those are done, this is ready to land.

My answers to the open decisions in the description:

  • Meta tag before SENTRY_RELEASE: yes for window.SENTRY_RELEASE. No for __SENTRY_RELEASE__, as the second concern above explains.
  • Bundle size: this is acceptable, and Size Check passes.
  • SolidStart's self-closing <meta .../>: this is fine. HTML parsers treat both forms the same.

Comment thread packages/browser/src/client.ts Resolved
Comment thread packages/browser/src/client.ts Resolved
@isaacs
isaacs force-pushed the feat/browser-release-meta-tag branch from ea4e999 to 3ba2c8a Compare November 17, 2026 23:33
@isaacs
isaacs marked this pull request as ready for review November 17, 2026 23:41
sentry-junior Bot and others added 3 commits November 17, 2026 23:42
The browser SDK now picks up the release from `<meta name="sentry-release">`
when `init` gets none. SvelteKit, SolidStart, React Router and TanStack Start
drop their own client readers, and their servers render the tag with one
shared helper from `@sentry/core`.

Co-Authored-By: Isaac Schlueter <isaac.schlueter@sentry.io>
…release` meta tag

The define belongs to the one bundle that set it, while the meta tag belongs to the page, so an embedded
script on another app's page keeps its own release.
@sentry-junior
sentry-junior Bot force-pushed the feat/browser-release-meta-tag branch from 3ba2c8a to 04c6dd6 Compare November 17, 2026 23:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant